import request from '@/utils/request'

// 查询比重sg
export function getSgByGrade(params) {
  return request({
    // url: 'weight/getSgByGrade',
    url: 'weight/getSgListByGrade',
    method: 'get',
    params,
  })
}

// 测定，输入一条数据
export function rpaCeding1Click(params) {
  return request({
    url: '/weight/ceding',
    method: 'get',
    params
  })
}

// 测定，输入两条数据
export function rpaCeding2Click(params) {
  return request({
    url: '/weight/ceding2',
    method: 'get',
    params
  })
}

// 检索
export function rpaJiansuoClick() {
  return request({
    url: '/weight/jiansuo',
    method: 'get',
  })
}

// 测定表示--展示曲线
export function rpaCedingShow() {
  return request({
    url: '/weight/cedingShow',
    method: 'get',
  })
}

// rpa点击、截屏、ocr识别
export function rpaOcrClick100() {
  return request({
    url: '/weight/rpaOcrClick100',
    method: 'get',
  })
}

// rpa点击、截屏、ocr识别
export function rpaOcrClick300() {
  return request({
    url: '/weight/rpaOcrClick300',
    method: 'get',
  })
}

// rpa点击、截屏、ocr识别
export function rpaOcrClick60() {
  return request({
    url: '/weight/rpaOcrClick60',
    method: 'get',
  })
}

// rpa点击、截屏、ocr识别
export function rpaOcrClick90() {
  return request({
    url: '/weight/rpaOcrClick90',
    method: 'get',
  })
}


//  保存重量、等级、比重
export function saveGradeWeightSg(data) {
  return request({
    url: 'weight/saveGradeWeightSg',
    method: 'post',
    data,
  })
}

// 找出坐标后，点两次终了，关闭窗口
export function rpaJZhongliaoClick() {
  return request({
    url: '/weight/zhongliao',
    method: 'get',
  })
}

// 实验5分钟后，会自动关闭测定中窗口，我需要关闭测定依赖登录窗口
export function cedingyilaidenglu() {
  return request({
    url: '/weight/cedingyilaidenglu',
    method: 'get',
  })
}

// 获取实验编号100、101
export function getQakansaByBatch(params) {
  return request({
    url: '/weight/getQakansaByBatch',
    method: 'get',
    params
  })
}

// 表示-出力-导出数据，CSV格式
export function biaoshiExport(params) {
  return request({
    url: '/weight/biaoshiExport',
    method: 'get',
    params
  })
}

// 表示-出力-导出数据，CSV数据分析
export function findClosestData(params) {
  return request({
    url: '/weight/findClosestData',
    method: 'get',
    params
  })
}

// 去QA_RPA_CURE_INSP查找有没有当前编号100(101)、等级、批次的实验数据，查找对应批次的已做实验数据
export function getInspData(params) {
  return request({
    url: '/weight/getInspData',
    method: 'get',
    params
  })
}

// 保存数据到QA_RPA_CURE_INSP
export function saveINSPData(data) {
  return request({
    url: '/weight/saveINSPData',
    method: 'post',
    data,
  })
}


// 保存数据到prd_bcd_qa_planresult
export function savePrdQaPlanresult(data) {
  return request({
    url: '/weight/savePrdQaPlanresult',
    method: 'post',
    data,
  })
}

// 实验是否结束
export function isExperimentComplete() {
  return request({
    url: '/weight/isExperimentComplete',
    method: 'get',
  })
}

// 查找CSV文件中特定时间点（3、6、9...300秒）的数据
export function findExcelData(params) {
  return request({
    url: '/excel/findDataByTimePoints',
    method: 'get',
    params
  })
}

export function saveExcelData(data) {
  return request({
    url: '/excel/saveExcelData',
    method: 'post',
    data
  })
}
